package com.feibo.controller;

import com.feibo.pojo.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Description: freemarker模板
 * @Author: zhenglinyong
 * @CreateDate: 2018/12/19 11:22 PM
 **/
@Controller
@RequestMapping("ftl")
public class FreemarkerController {

    @Autowired
    private Resource resource;

    @RequestMapping("/center")
    public String center() {
        return "freemarker/center/center";
    }

    @RequestMapping("/index")
    public String index(ModelMap map) {
        map.addAttribute("resource", resource);
        return "freemarker/index";
    }
}
